package com.lmonkey.servlet.user;

import com.lmonkey.com.lmonkey.service.LMONKEY_USERDao;
import com.lmonkey.entity.LMONKEY_FENLEI;
import com.lmonkey.entity.LMONKEY_USER;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;

@WebServlet("/manager/CLtoupdate")
public class CLtoupdate extends HttpServlet {

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {


        request.setCharacterEncoding("UTF-8");
        response.setContentType("text/html,charset=utf-8");

        String id= request.getParameter("id");
        System.out.println("id="+id);

        LMONKEY_FENLEI u=null;
        try {
            u=LMONKEY_USERDao.CLselectById(id);
        } catch (SQLException e) {
            e.printStackTrace();
        }
        request.setAttribute("u",u);

        request.getRequestDispatcher("/manager/admin_fenlei_update.jsp").forward(request,response);
    }



}
